<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0"/>
<link rel="stylesheet" href="css/themes/default/jquery.mobile-1.3.2.css"/>
<script src="js/jquery-1.11.1.js"></script>
<script src="js/jquery.mobile-1.3.2.js"></script>
<script src="js/area.js"></script>
<style>
.zdcd a{text-decoration:none;}
</style>
<meta charset="utf-8">
</head>
<body>
    
 <div data-role="page" id="zhgl">
      <div data-role="header">
        <h1>转账汇款确认</h1>
      </div>
    
     <div data-role="content">

    <form method="post" action="zzhkcg.html" id="tijiao">
        <label for="fullname">输入帐户密码：</label>
        <input type="password" name="fullname" id="pwd">
        <label for="fullname">输入验证码：</label>
        <input type="text" name="fullname" id="checkno">
        <a href="" data-role="button" onclick="sendmsg();">点击获取验证码</a>
    	<input type="submit" data-inline="true" value="确认">
    	<span id="msg"></span>
   </form>
        <script type="text/javascript">  
   function sendmsg(){
	$.ajax({
		url:"../yonghuziliao/checkno.mobile",
		type:"post",
		data:{"username":cardno},
		success:function(data){
			$("#msg").html(data.msg);
			$("#msg").css("backgroundColor","#CFFFCF");
		}
	});
}

    $(document).ready(function(){  
        var cishu=0;
        $("#tijiao").submit(function(){
        var jieguo=false;
            var password=$("#pwd").val();
	var checkno=$("#checkno").val();
	if(password==""){
		$("#msg").html("密码不能为空");
		$("#msg").css("backgroundColor","#CFFFCF");
		return false;
	}else if(checkno==""){
		$("#msg").html("验证码不能为空");
		$("#msg").css("backgroundColor","#CFFFCF");
		return false;
	}else if(cishu>=2){
		$("#msg").html("验证码错误超过三次，请重新获取验证码");
		$("#msg").css("backgroundColor","#CFFFCF");
		return false;
	}
	$.ajax({
		url:"../yonghuziliao/checkyanzheng.mobile",
		type:"post",
		data:{"password":password,"checkno":checkno,"yinhangzhanghao":cardno},
		async:false,
		success:function(data){
			if(!data.flag){
				$("#msg").html(data.msg);
				$("#msg").css("backgroundColor","#CFFFCF");
				cishu+=1;
				jieguo=false;
			}else{
				jieguo=true;
				zhuanzhangmima=password;
			}
		}
	});
	return jieguo; 
        });  
    });  
    </script> 
      <div data-role="footer" data-position="fixed">
        <h1></h1>
      </div>
    </div>
  
    </div>

</body>
</html>
